package com.hy.medicine;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hy.medicine.Excel.ExcelRequired;
import lombok.Data;
import org.springframework.format.annotation.NumberFormat;

import java.math.BigDecimal;

/**
 * 药品基本信息表
 * @TableName medicine_basic_info
 */
@TableName(value ="medicine_basic_info")
@Data
public class MedicineBasicInfo {
    /**
     * 药品唯一标识
     */
    @ExcelIgnore
    @TableId(type = IdType.AUTO)
    private Integer medicineId;

    /**
     * 药品名称
     */
    @ExcelProperty(value = "药品名称", index = 0)
    @ExcelRequired(message = "药品名称不能为空")
    private String medicineName;

    /**
     * 药品图片
     */
    @ExcelIgnore
    private String imageUrl;

    /**
     * 药品规格
     */
    @ExcelProperty(value = "规格", index = 1)
    @ExcelRequired(message = "规格不能为空")
    private String specification;

    /**
     * 剂型
     */
    @ExcelProperty(value = "剂型", index = 2)
    @ExcelRequired(message = "剂型不能为空")
    private String dosageForm;

    /**
     * 药品批准文号
     */
    @ExcelProperty(value = "批准文号", index = 3)
    @ExcelRequired(message = "批准文号不能为空")
    private String approvalNumber;

    /**
     * 生产厂家
     */
    @ExcelProperty(value = "生产厂家", index = 4)
    @ExcelRequired(message = "生产厂家不能为空")
    private String manufacturer;

    /**
     * 保质期（月）
     */
    @ExcelProperty(value = "保质期(月)", index = 5)
    @ExcelRequired(message = "保质期不能为空")
    private Integer shelfLife;

    /**
     * 储存条件
     */
    @ExcelProperty(value = "储存条件", index = 6)
    private String storageCondition;

    /**
     * 药品成分 - 不适合Excel导入导出
     */
    @ExcelIgnore
    private String ingredients;

    /**
     * 适应症 - 不适合Excel导入导出
     */
    @ExcelIgnore
    private String indications;

    /**
     * 禁忌症 - 不适合Excel导入导出
     */
    @ExcelIgnore
    private String contraindications;

    /**
     * 通用分类ID
     */
    @ExcelProperty(value = "通用分类", index = 7)
    private String commonCategoryId;
    @TableField(exist = false)
    private String commonCategoryName;

    /**
     * 处方分类ID
     */
    @ExcelProperty(value = "处方类型", index = 8)
    private String prescriptionCategoryId;
    @TableField(exist = false)
    private String prescriptionCategoryName;

    // 库存数量
    @ExcelProperty(value = "库存数量", index = 9)
    @TableField("minStock")
    private Integer minStock;




    /**
     * 药品单价
     */
    @ExcelProperty(value = "单价(元)", index = 10)
    @NumberFormat(pattern = "#.##")
    @ExcelRequired(message = "单价不能为空")
    private BigDecimal price;


    /**
     * 总销量
     */

    private Integer salesVolume;

//    假删 0-删除 1-未删除
    private Integer Deleted;

    // 用法用量
    private String usageMethod;

    // 注意事项
    private String precautionNotes;

    // 不良反应
    private String sideEffectDescriptions;

    // 药物相互作用
    private String drugInteractionDetails;
}
